package com.hwtx.form.persistence;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hwtx.form.domain.repo.OrgUserRepo;
import com.hwtx.form.domain.vo.UserRole;
import io.geekidea.boot.system.entity.SysOrgUser;
import io.geekidea.boot.system.mapper.OrgUserMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrgUserRepoImpl extends ServiceImpl<OrgUserMapper, SysOrgUser> implements OrgUserRepo {
    @Resource
    private OrgUserMapper orgUserMapper;

    @Override
    public List<Long> getOrgRoleIdsByUserId(Long userId) {
        return orgUserMapper.getOrgRoleIdsByUserId(userId);
    }

    @Override
    public List<UserRole> getOrgRolesByUserId(List<Long> userIds) {
        return orgUserMapper.getOrgRolesByUserIds(userIds);
    }
}
